<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        // script 写在body外面
        var num_1 = 1
        var num_2 = '1'

        // js:==判断的事两个值是否相等，不关心类型问题
        if(num_1 == num_2){
            console.log('相等')
        }else{
            console.log('不相等')
        }

        // js:===会判断两个变量的类型
        if(num_1 === num_2){
            console.log('相等')
        }else{
            console.log('不相等')
        }

        var data = '鸡蛋'
        if(data === '香蕉'){
            console.log('香蕉')
        }else if(data === '苹果'){
            console.log('苹果')
        }else if(data === '鸡蛋'){
            console.log('鸡蛋')
        }else{
            console.log('其他')
        }


        // 三目运算
        5>3?console.log('条件成立'):console.log('条件不成立')

        var res = 1 > 2 ? 1 : 2
        console.log(res)
    </script>

    
</head>
    
<body>
    
</body>
</html>